<template>
    <div>
        <el-dialog title="提交盘点" :visible.sync="subshow" :before-close="conmel" width="500px">
            <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple
                show-file-list :on-change="uploadChange" :headers="{ 'Authorization': token }" :data="datainfo"
                :show-file-list="true">
                <i class="el-icon-upload"></i>
                <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                <div class="el-upload__text" style="font-size: 12px; color: #919191; margin-top: 5px;">
                    请选择要导入的数据文件(Excel格式)</div>
                <div class="el-upload__tip" slot="tip" style="display:flex; align-items: center;"><span><el-link
                            type="primary" style="font-size: 12px;">下载导入文件</el-link></span><span>填写盘点结果并上传</span>
                </div>
            </el-upload>
        </el-dialog>
    </div>
</template>

<script>

export default {
    name: "ventory_submit",
    props: {
        subshow: {
            type: Boolean,
            required: true
        }
    },
    watch: {

    },
    components: {
    },
    data() {
        return {
            datainfo: {},
            token: '',

        }
    },
    mounted() {

    },
    methods: {
        conmel() {
            this.$emit('close')
        },
        handlePageChange(e) {
            console.log(e);
        },
        uploadChange(e) {
            console.log(e);

        }
    }

}
</script>


<style lang="less" scoped>
::v-deep .el-input {
    width: 200px;
}

::v-deep .el-textarea {
    width: 500px;
}


.upload-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.buttoncenter {
    margin-bottom: 10px;
    float: right;
}
</style>